package com.cmdb.system.domain;

import com.cmdb.common.annotation.Excel;
import com.cmdb.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 邮件配置对象 sys_email_config
 */
public class SysEmailConfig extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 配置ID */
    private Long configId;

    /** 邮件服务器的SMTP地址 */
    @Excel(name = "SMTP服务器")
    private String emailHost;

    /** 邮件服务器的SMTP端口 */
    @Excel(name = "SMTP端口")
    private Integer emailPort;

    /** 发件人邮箱 */
    @Excel(name = "发件人邮箱")
    private String emailUsername;

    /** 发件人密码（授权码） */
    private String emailPassword;

    /** 是否开启SSL认证（Y是 N否） */
    @Excel(name = "SSL认证", readConverterExp = "Y=是,N=否")
    private String emailSsl;

    /** 是否默认配置（Y是 N否） */
    @Excel(name = "是否默认", readConverterExp = "Y=是,N=否")
    private String isDefault;

    /** 发件人邮箱地址 */
    @Excel(name = "发件人地址")
    private String emailFrom;

    /** 发件人显示的名称 */
    @Excel(name = "发件人名称")
    private String emailFromName;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    public Long getConfigId() {
        return configId;
    }

    public void setConfigId(Long configId) {
        this.configId = configId;
    }

    public String getEmailHost() {
        return emailHost;
    }

    public void setEmailHost(String emailHost) {
        this.emailHost = emailHost;
    }

    public Integer getEmailPort() {
        return emailPort;
    }

    public void setEmailPort(Integer emailPort) {
        this.emailPort = emailPort;
    }

    public String getEmailUsername() {
        return emailUsername;
    }

    public void setEmailUsername(String emailUsername) {
        this.emailUsername = emailUsername;
    }

    public String getEmailPassword() {
        return emailPassword;
    }

    public void setEmailPassword(String emailPassword) {
        this.emailPassword = emailPassword;
    }

    public String getEmailSsl() {
        return emailSsl;
    }

    public void setEmailSsl(String emailSsl) {
        this.emailSsl = emailSsl;
    }

    public String getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(String isDefault) {
        this.isDefault = isDefault;
    }

    public String getEmailFrom() {
        return emailFrom;
    }

    public void setEmailFrom(String emailFrom) {
        this.emailFrom = emailFrom;
    }

    public String getEmailFromName() {
        return emailFromName;
    }

    public void setEmailFromName(String emailFromName) {
        this.emailFromName = emailFromName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("configId", getConfigId())
                .append("emailHost", getEmailHost())
                .append("emailPort", getEmailPort())
                .append("emailUsername", getEmailUsername())
                .append("emailPassword", getEmailPassword())
                .append("emailSsl", getEmailSsl())
                .append("isDefault", getIsDefault())
                .append("emailFrom", getEmailFrom())
                .append("emailFromName", getEmailFromName())
                .append("status", getStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
} 